<template>
	<view class="ils">
		<view class="ilsData">
			<text>{{title}}</text>
			<view>
				<rich-text :nodes="content"></rich-text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: '',
				content: ''
			}
		},
	    onLoad:function(e){
			uni.showLoading({
				title:"加载中...."
			})
	    	uni.request({
	    		url:'https://unidemo.dcloud.net.cn/api/news/36kr/'+e.newsid,
	    		method: 'GET',
	    		data: {},
	    		success: res => {
					this.title=res.data.title
					this.content=res.data.content
					uni.hideLoading()
				},
	    		fail: () => {},
	    		complete: () => {}
	    	});
	    }
	}
</script>

<style>
.ils{padding: 20upx 2%;width: 96%; flex-wrap: wrap;}
	
.ilsData text{
	font-size: 1.2em;
}
.ilsData uni-view{
	font-size: 1em;
}
</style>
